package com.example.springboottest.view.pdf;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.lowagie.text.Document;
import com.lowagie.text.pdf.PdfWriter;

/**
 * 定义一个导出的接口，方便每个控制器实现自己的导出逻辑
 */
public interface PdfExportService {

    /**
     * 导出的方法
     *
     * @param model    数据模型
     * @param document 代表一个pdf文档
     * @param writer   pdf写入器
     * @param request  HttpServletRequest请求对象
     * @param response HttpServletResponse响应对象
     */
    public void make(Map<String, Object> model, Document document, PdfWriter writer,
                     HttpServletRequest request, HttpServletResponse response);
}